# -*- coding:utf-8 -*-


from rest_framework import serializers
from Apps.user.models import User


class UserSer(serializers.ModelSerializer):
    class Meta:
        model = User
        # fields = ["username",'', "last_login", "email", "date_joined", "avatar", 'password']
        fields = '__all__'


# 创建人，修改人序列化器
class CMUserSer(serializers.ModelSerializer):
    class Meta:
        model = User
        fields = ["id", "username", "avatar"]
